﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using SIGSender;
using Common;




namespace TCPEmulator
{
    public partial class Form1 : Form
    {
        Socket client;
        IPEndPoint server;
        SelectiveRepeat mySender;

        
        public Form1()
        {
            InitializeComponent();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                textBox3.Text = dlg.FileName;
            }

        }

        private void button3_Click(object sender, EventArgs e)
        {

            //Call George's Method and pass textBox3.Text as input to it            
            byte[] mock = new byte[4] {1,2,3,4};

            Packetizer pack = new Packetizer(textBox3.Text);
            mySender.sendData(pack.PacketData());


        }

        private void button5_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            mySender = new SelectiveRepeat(textBox1.Text, Convert.ToInt32( textBox2.Text));           

        }

      




    }
}
